#{extends 'mana-main.html' /}
#{set articleActive :"active" /}
#{set title :"查看文章" /}
<br>
<br>
<br>
<br>
<br>

<ul class="nav nav-tabs">
#{if type==0}
    <li class="active">
        <a href="@{Articles.showArticle(1,0)}">未审核</a>
    </li>
    <li><a href="@{Articles.showArticle(1,1)}">已审核</a></li>
#{/if}
#{if type==1}
    <li>
        <a href="@{Articles.showArticle(1,0)}">未审核</a>
    </li>
    <li  class="active"><a href="@{Articles.showArticle(1,1)}">已审核</a></li>
#{/if}
</ul>
#{if articlelList}
<table class="table table-hover table-bordered">
    <tr>
        <th width="20%">标题</th>
        <th>id</th>
        <th>日期</th>
        <th width="10%">查看</th>
        <th width="10%">拒绝</th>
        <th width="10%">通过</th>
    </tr>
    #{list items:articlelList,as :'article'}
        <tr>
            <td> ${article.title}</td>
            <td>${article.id}</td>
            <td>${new Date(article.createTime).format('yyyy-MM-dd')}</td>
            <td><a class="btn btn-info" href="@{Application.article(article.id)}">查看</a></td>
            <td><a class="btn btn-danger" href="@{Articles.verifyArticle(article.id,type,0)}">拒绝</a></td>
            <td><a class="btn btn-success" href="@{Articles.verifyArticle(article.id,type,1)}">通过</a></td>
        </tr>
    #{/list}
</table>
    #{page pageBean: pageBean, params : params/}
#{/if}
